package edu.bit.water.dao;

import edu.bit.water.entity.Roles;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface RolesDao {
    int insertRoles(Roles Roles) throws DataIntegrityViolationException;
    Integer getMaxId();
    int deleteRoles(@Param("id") int id);
    int deleteUserRoleRel(int userid);
    int updateRoles(Roles Roles);
    int deleteValidate(int RoleId);
    String selectRoleNameByRoleId(int id);
    List<Roles> selectRoles();
    List<Roles> selectRolesByComId(@Param("companyId") String companyId);
}